/*
 * ObjectManager.h
 *
 *  Created on: 14/02/2011
 *      Author: Nenem
 */

#ifndef OBJECTMANAGER_H_
#define OBJECTMANAGER_H_

#include "GameObject.h"
#include "Dictionary.h"

#include <map>
#include <string>
#include <fstream>
#include <vector>
using namespace std;

class ObjectManager {
private:
	int playerID;
	map<int, GameObject*> objs;
	Dictionary *dictionary;
	Collision *collision;
	Fight *fight;
	Conversation *conversation;
	ConversationView *conversationView;
	StepTrigger *stepTrigger;
public:
	ObjectManager();
	virtual ~ObjectManager();
	void createPlayer(string playerName);
	void createSceneryObjecs(string newMap, vector<int> *objIDs);
	void killObjects(vector<int> *objIDs);
	void init(int delta, int time, Scenery *scenery, Graphics* graphics);
	void update(int delta, int time, Scenery *scenery, Graphics* graphics);
	void erase(int objID);
	int createObject(string name);
	GameObject *getPlayer();
    ConversationView *getConversationView() const
    {
        return conversationView;
    }

    void setConversationView(ConversationView *conversationView)
    {
        this->conversationView = conversationView;
    }

};

#endif /* OBJECTMANAGER_H_ */
